package com.li.springbootproject.controller.test;

import com.li.springbootproject.domain.test.Progress;
import com.li.springbootproject.service.test.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 6/19/2022 10:19 AM
 */
@RestController
@RequestMapping("/common")
public class CommonController {

    @Autowired
    private CommonService commonService;

    @GetMapping("/get/{key}")
    public Progress getCurrentProgress(@PathVariable("key") String key) {
        return commonService.getProgress(key);
    }

    @PostMapping("/insert/demo")
    public void test(){
        commonService.insertDemo();
    }

}
